<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>BuildAdmin</title>
    <meta name="generator" content="VuePress 1.9.7">
    <link rel="icon" href="/images/favicon.ico">
    <meta name="description" content="使用流行技术栈快速创建商业级后台管理系统-BuildAdmin是基于TP6、Vue3.x、Typescript、Vite、Pinia、Element plus等的开源后台系统">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="keywords" content="BuildAdmin,ThinkPHP6通用后台,Vue3后台,BuildAdmin文档,vue3开源后台,vue3模板与案例市场">
    <meta name="author" content="妙码生花">
    <meta name="robots" content="all,follow">
    
    <link rel="preload" href="/assets/css/0.styles.76db4400.css" as="style"><link rel="preload" href="/assets/js/app.26dfc26f.js" as="script"><link rel="preload" href="/assets/js/2.845fc4bd.js" as="script"><link rel="preload" href="/assets/js/41.20484420.js" as="script"><link rel="prefetch" href="/assets/js/10.31502a42.js"><link rel="prefetch" href="/assets/js/11.c0667200.js"><link rel="prefetch" href="/assets/js/12.0022daab.js"><link rel="prefetch" href="/assets/js/13.496b9007.js"><link rel="prefetch" href="/assets/js/14.57a77bc0.js"><link rel="prefetch" href="/assets/js/15.a2ee4fc7.js"><link rel="prefetch" href="/assets/js/16.7050523a.js"><link rel="prefetch" href="/assets/js/17.c4c5529f.js"><link rel="prefetch" href="/assets/js/18.f0350247.js"><link rel="prefetch" href="/assets/js/19.60586b14.js"><link rel="prefetch" href="/assets/js/20.4c6361b4.js"><link rel="prefetch" href="/assets/js/21.f793d386.js"><link rel="prefetch" href="/assets/js/22.299fa3b0.js"><link rel="prefetch" href="/assets/js/23.460af9b1.js"><link rel="prefetch" href="/assets/js/24.67771dfc.js"><link rel="prefetch" href="/assets/js/25.57b0bfa7.js"><link rel="prefetch" href="/assets/js/26.30e9faee.js"><link rel="prefetch" href="/assets/js/27.15ffda62.js"><link rel="prefetch" href="/assets/js/28.4ca46604.js"><link rel="prefetch" href="/assets/js/29.09a58cb6.js"><link rel="prefetch" href="/assets/js/3.959fd4f8.js"><link rel="prefetch" href="/assets/js/30.c53f15cb.js"><link rel="prefetch" href="/assets/js/31.0d30028e.js"><link rel="prefetch" href="/assets/js/32.4591b41b.js"><link rel="prefetch" href="/assets/js/33.bd9ed146.js"><link rel="prefetch" href="/assets/js/34.0bedaafb.js"><link rel="prefetch" href="/assets/js/35.dded2c4a.js"><link rel="prefetch" href="/assets/js/36.3f14f7ef.js"><link rel="prefetch" href="/assets/js/37.348ab3dc.js"><link rel="prefetch" href="/assets/js/38.bea67b35.js"><link rel="prefetch" href="/assets/js/39.66735bad.js"><link rel="prefetch" href="/assets/js/4.a7dad9f3.js"><link rel="prefetch" href="/assets/js/40.24ae817d.js"><link rel="prefetch" href="/assets/js/42.d2d9cf07.js"><link rel="prefetch" href="/assets/js/43.638926f9.js"><link rel="prefetch" href="/assets/js/44.5b2e8865.js"><link rel="prefetch" href="/assets/js/45.b08599e3.js"><link rel="prefetch" href="/assets/js/46.3e165b3e.js"><link rel="prefetch" href="/assets/js/47.0f981d94.js"><link rel="prefetch" href="/assets/js/48.52c21e5e.js"><link rel="prefetch" href="/assets/js/49.5d5d4c94.js"><link rel="prefetch" href="/assets/js/5.2d6b30a8.js"><link rel="prefetch" href="/assets/js/50.379ba4f0.js"><link rel="prefetch" href="/assets/js/51.4f4ecaea.js"><link rel="prefetch" href="/assets/js/52.81ccb047.js"><link rel="prefetch" href="/assets/js/53.419686cb.js"><link rel="prefetch" href="/assets/js/54.783cb319.js"><link rel="prefetch" href="/assets/js/55.110fde12.js"><link rel="prefetch" href="/assets/js/56.53900e45.js"><link rel="prefetch" href="/assets/js/57.55cd3551.js"><link rel="prefetch" href="/assets/js/58.2b82c178.js"><link rel="prefetch" href="/assets/js/59.fec4fe12.js"><link rel="prefetch" href="/assets/js/6.4e9a5a2e.js"><link rel="prefetch" href="/assets/js/60.99354f6f.js"><link rel="prefetch" href="/assets/js/61.c528c138.js"><link rel="prefetch" href="/assets/js/62.831c810e.js"><link rel="prefetch" href="/assets/js/63.9923d5c6.js"><link rel="prefetch" href="/assets/js/64.01b9c0fd.js"><link rel="prefetch" href="/assets/js/65.1288d968.js"><link rel="prefetch" href="/assets/js/66.f7c8aabd.js"><link rel="prefetch" href="/assets/js/67.89455afa.js"><link rel="prefetch" href="/assets/js/68.ca185a9e.js"><link rel="prefetch" href="/assets/js/69.dfe2288f.js"><link rel="prefetch" href="/assets/js/7.58476ce6.js"><link rel="prefetch" href="/assets/js/70.ea823c37.js"><link rel="prefetch" href="/assets/js/71.9e222b70.js"><link rel="prefetch" href="/assets/js/72.77b15e17.js"><link rel="prefetch" href="/assets/js/73.f42962da.js"><link rel="prefetch" href="/assets/js/74.a2912f27.js"><link rel="prefetch" href="/assets/js/75.8db3af79.js"><link rel="prefetch" href="/assets/js/76.45426b7e.js"><link rel="prefetch" href="/assets/js/77.a5d8ef7a.js"><link rel="prefetch" href="/assets/js/78.cfcdd83a.js"><link rel="prefetch" href="/assets/js/79.d8b5e327.js"><link rel="prefetch" href="/assets/js/8.419e773f.js"><link rel="prefetch" href="/assets/js/80.a64f0503.js"><link rel="prefetch" href="/assets/js/9.633ba216.js">
    <link rel="stylesheet" href="/assets/css/0.styles.76db4400.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container max-content"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/images/logo.png" alt="BuildAdmin" class="logo"> <span class="site-name can-hide">BuildAdmin</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/guide/" class="nav-link router-link-active">
  指南
</a></div><div class="nav-item"><a href="/senior/" class="nav-link">
  进阶
</a></div><div class="nav-item"><a href="https://buildadmin.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  官网
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://demo.buildadmin.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  线上演示
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="代码仓库" class="dropdown-title"><span class="title">代码仓库</span> <span class="arrow down"></span></button> <button type="button" aria-label="代码仓库" class="mobile-dropdown-title"><span class="title">代码仓库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://gitee.com/wonderful-code/buildadmin" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://github.com/build-admin/buildadmin" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><a href="/fastadmin.html" class="nav-link">
  🎉FastAdmin
</a></div><div class="nav-item"><a href="https://gitee.com/wonderful-code/buildadmin/blob/master/CHANGELOG.md" target="_blank" rel="noopener noreferrer" class="nav-link external">
  更新日志
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <a href="https://gitee.com/wonderful-code/build-admin-doc" target="_blank" rel="noopener noreferrer" class="repo-link">
    文档仓库
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/guide/" class="nav-link router-link-active">
  指南
</a></div><div class="nav-item"><a href="/senior/" class="nav-link">
  进阶
</a></div><div class="nav-item"><a href="https://buildadmin.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  官网
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://demo.buildadmin.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  线上演示
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="代码仓库" class="dropdown-title"><span class="title">代码仓库</span> <span class="arrow down"></span></button> <button type="button" aria-label="代码仓库" class="mobile-dropdown-title"><span class="title">代码仓库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://gitee.com/wonderful-code/buildadmin" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://github.com/build-admin/buildadmin" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><a href="/fastadmin.html" class="nav-link">
  🎉FastAdmin
</a></div><div class="nav-item"><a href="https://gitee.com/wonderful-code/buildadmin/blob/master/CHANGELOG.md" target="_blank" rel="noopener noreferrer" class="nav-link external">
  更新日志
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <a href="https://gitee.com/wonderful-code/build-admin-doc" target="_blank" rel="noopener noreferrer" class="repo-link">
    文档仓库
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>入门须知</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide/" aria-current="page" class="sidebar-link">介绍</a></li><li><a href="/guide/permit.html" class="sidebar-link">许可</a></li><li><a href="/guide/learnDoc.html" class="sidebar-link">学习文档</a></li><li><a href="/guide/specialThanks.html" class="sidebar-link">特别鸣谢</a></li><li><a href="/guide/technologySelection.html" class="sidebar-link">技术选型答疑</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>安装</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide/install/start.html" class="sidebar-link">快速上手</a></li><li><a href="/guide/install/senior.html" class="sidebar-link">安装服务进阶</a></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>安装附录</span> <span class="arrow right"></span></p> <!----></section></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>其他</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide/other/developerMustSee.html" class="sidebar-link">开发者必看</a></li><li><a href="/guide/other/contributionCode.html" class="sidebar-link">贡献代码</a></li><li><a href="/guide/other/gitCommitSpecification.html" class="sidebar-link">git 提交规范</a></li><li><a href="/guide/other/update.html" aria-current="page" class="active sidebar-link">框架更新指南</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/guide/other/update.html#git包" class="sidebar-link">Git包</a></li><li class="sidebar-sub-header"><a href="/guide/other/update.html#拉取代码-更新示范第一步" class="sidebar-link">拉取代码（更新示范第一步）</a></li><li class="sidebar-sub-header"><a href="/guide/other/update.html#解决冲突-更新示范第二步" class="sidebar-link">解决冲突（更新示范第二步）</a></li><li class="sidebar-sub-header"><a href="/guide/other/update.html#完成合并-更新示例第三步" class="sidebar-link">完成合并（更新示例第三步）</a></li><li class="sidebar-sub-header"><a href="/guide/other/update.html#调整不兼容更新" class="sidebar-link">调整不兼容更新</a></li></ul></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>附录</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>不兼容更新</span> <span class="arrow right"></span></p> <!----></section></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><blockquote><p>BuildAdmin是一个持续迭代版本、新增功能和修复BUG的系统，您可以参考此文档保持您的BuildAdmin为最新版本。</p></blockquote> <h2 id="git包"><a href="#git包" class="header-anchor">#</a> Git包</h2> <p>我们推荐您使用Git管理系统的代码，这是目前世界上最好的版本管理工具，没有之一。</p> <h4 id="更新核心代码"><a href="#更新核心代码" class="header-anchor">#</a> 更新核心代码</h4> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token comment"># 保存工作现场（将目前还不想提交的但是已经修改的代码保存至堆栈中）</span>
<span class="token function">git</span> stash

<span class="token comment"># 从远程仓库获取最新代码并自动合并到本地</span>
<span class="token function">git</span> pull

<span class="token comment"># pull 命令如果有冲突，先处理冲突，下文有处理冲突示范（您新增的文件不会发生冲突，而框架文件我们更新同时您也更新了该文件才可能冲突）</span>

<span class="token comment"># 恢复工作现场</span>
<span class="token function">git</span> stash pop
</code></pre></div><h4 id="更新后端依赖"><a href="#更新后端依赖" class="header-anchor">#</a> 更新后端依赖</h4> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token function">composer</span> update <span class="token parameter variable">-vvv</span>
</code></pre></div><h4 id="更新前端依赖"><a href="#更新前端依赖" class="header-anchor">#</a> 更新前端依赖</h4> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token comment"># ctrl+c 关闭 Vite 开发服务</span>

<span class="token comment"># 更新前端依赖</span>
<span class="token function">pnpm</span> i

<span class="token comment"># 重新开启 Vite 开发服务</span>
<span class="token function">pnpm</span> dev
</code></pre></div><h4 id="更新数据库"><a href="#更新数据库" class="header-anchor">#</a> 更新数据库</h4> <p>如果<code>app/admin/buildadmin.sql</code>文件有更新，请根据<code>Git</code>更新日志对比直接修改数据库。</p> <h4 id="清理系统缓存"><a href="#清理系统缓存" class="header-anchor">#</a> 清理系统缓存</h4> <p>后台-&gt;右上角垃圾桶图标-&gt;清理系统缓存（该操作会删除<code>runtime/cache目录</code>）</p> <h4 id="更新时额外可能会用到的命令"><a href="#更新时额外可能会用到的命令" class="header-anchor">#</a> 更新时额外可能会用到的命令</h4> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token comment"># 查看远程仓库信息</span>
<span class="token function">git</span> remote <span class="token parameter variable">-v</span>

<span class="token comment"># 查看 stash 队列</span>
<span class="token function">git</span> stash list

<span class="token comment"># 清空 stash 队列</span>
<span class="token function">git</span> stash <span class="token function">clear</span>
</code></pre></div><blockquote><p>下文提供了一次完整的更新示范，以方便不了解git的小伙伴更新框架</p></blockquote> <h2 id="拉取代码-更新示范第一步"><a href="#拉取代码-更新示范第一步" class="header-anchor">#</a> 拉取代码（更新示范第一步）</h2> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token comment"># 保存工作现场</span>
<span class="token function">git</span> stash
Saved working directory and index state WIP on master: ******** <span class="token comment"># 命令输出：保存工作区成功</span>

<span class="token comment"># 检查远程仓库设置</span>
<span class="token function">git</span> remote <span class="token parameter variable">-v</span>
origin      https://gitee.com/wonderful-code/buildadmin.git <span class="token punctuation">(</span>fetch<span class="token punctuation">)</span>
origin      https://gitee.com/wonderful-code/buildadmin.git <span class="token punctuation">(</span>push<span class="token punctuation">)</span>
<span class="token comment"># PS：笔者这里BuildAdmin远程仓库的名称是origin，你仓库的可能不一样，或者干脆没有地址为`https://gitee.com/wonderful-code/buildadmin.git`的远程仓库设置</span>
<span class="token comment"># 如果没有该仓库地址，请执行命令添加：git remote add buildamdin https://gitee.com/wonderful-code/buildadmin.git</span>

<span class="token comment"># 拉取最新代码，buildadmin 为远程仓库名称</span>
<span class="token function">git</span> pull buildadmin master
remote: Enumerating objects: <span class="token number">833</span>, done.
remote: Counting objects: <span class="token number">100</span>% <span class="token punctuation">(</span><span class="token number">336</span>/336<span class="token punctuation">)</span>, done.
remote: Compressing objects: <span class="token number">100</span>% <span class="token punctuation">(</span><span class="token number">151</span>/151<span class="token punctuation">)</span>, done.
remote: Total <span class="token number">833</span> <span class="token punctuation">(</span>delta <span class="token number">243</span><span class="token punctuation">)</span>, reused <span class="token number">183</span> <span class="token punctuation">(</span>delta <span class="token number">183</span><span class="token punctuation">)</span>, pack-reused <span class="token number">497</span>
Receiving objects: <span class="token number">100</span>% <span class="token punctuation">(</span><span class="token number">833</span>/833<span class="token punctuation">)</span>, <span class="token number">265.19</span> KiB <span class="token operator">|</span> <span class="token number">385.00</span> KiB/s, done.
Resolving deltas: <span class="token number">100</span>% <span class="token punctuation">(</span><span class="token number">434</span>/434<span class="token punctuation">)</span>, completed with <span class="token number">72</span> <span class="token builtin class-name">local</span> objects.
From https://gitee.com/wonderful-code/buildadmin
 * branch            master     -<span class="token operator">&gt;</span> FETCH_HEAD
 * <span class="token punctuation">[</span>new branch<span class="token punctuation">]</span>      master     -<span class="token operator">&gt;</span> buildadmin/master
Auto-merging app/admin/controller/Index.php <span class="token comment"># 更新已自动合并</span>
Auto-merging app/api/common.php
Auto-merging app/api/controller/Account.php
Auto-merging app/api/controller/User.php
Auto-merging app/api/lang/zh-cn.php
CONFLICT <span class="token punctuation">(</span>content<span class="token punctuation">)</span>: Merge conflict <span class="token keyword">in</span> app/api/lang/zh-cn.php <span class="token comment"># 冲突！仓库改了这个文件，你本地也改了这个文件，需要手动解决冲突</span>
Auto-merging app/common/library/Auth.php
Auto-merging config/buildadmin.php
Auto-merging extend/ba/module/Manage.php
Auto-merging web/src/api/controllerUrls.ts
Auto-merging web/src/api/frontend/user/index.ts
Auto-merging web/src/utils/axios.ts
CONFLICT <span class="token punctuation">(</span>content<span class="token punctuation">)</span>: Merge conflict <span class="token keyword">in</span> web/src/utils/axios.ts <span class="token comment"># 冲突！</span>
Auto-merging web/src/views/frontend/user/account/overview.vue
CONFLICT <span class="token punctuation">(</span>content<span class="token punctuation">)</span>: Merge conflict <span class="token keyword">in</span> web/src/views/frontend/user/account/overview.vue <span class="token comment"># 冲突！</span>
Automatic merge failed<span class="token punctuation">;</span> fix conflicts and <span class="token keyword">then</span> commit the result. <span class="token comment"># 提示你需要手动解决冲突，然后commit</span>
</code></pre></div><h2 id="解决冲突-更新示范第二步"><a href="#解决冲突-更新示范第二步" class="header-anchor">#</a> 解决冲突（更新示范第二步）</h2> <ul><li>找到以上提示冲突的文件，逐一手动解决冲突。</li> <li>您也可以直接打开<code>VScode</code>编辑器，在源代码管理选项卡上，所有的冲突文件被罗列在<code>合并更改</code>处，如图所示：<br> <br> <img src="/images/guide/other/git-pull-1.png" alt=""> <br> <br>
点开第一个冲突文件，可以看到<code>git</code>使用<code>&lt;&lt;&lt;&lt;&lt;&lt;&lt;......&gt;&gt;&gt;&gt;&gt;&gt;&gt;</code>包裹了冲突部分的代码，并使用<code>=======</code>分隔了本地代码和新代码<br> <br> <img src="/images/guide/other/git-pull-2.png" alt=""> <br> <br> <code>VScode</code>在冲突代码块之上，提供了<code>Accept Current Change</code>、<code>Accept Incoming Change</code>、<code>Accept Both Change</code>、等按钮，可以方便的进行一键合并。非<code>VScode</code>用户手动进行合并即可。
<br> <br> <code>app/api/lang/zh-cn.php</code>文件合并前<br> <br> <img src="/images/guide/other/git-pull-3.png" alt=""><br> <br> <code>app/api/lang/zh-cn.php</code>文件合并后，（合并时请删除<code>&lt;</code>、<code>&gt;</code>、<code>=</code>等符号，只保留正确的代码即可）<br> <br> <img src="/images/guide/other/git-pull-4.png" alt=""><br> <br> <code>src/views/frontend/user/account/overview.vue</code>文件合并前<br> <br> <img src="/images/guide/other/git-pull-5.png" alt=""><br> <br> <code>src/views/frontend/user/account/overview.vue</code>文件合并后<br> <br> <img src="/images/guide/other/git-pull-6.png" alt="">\</li></ul> <h2 id="完成合并-更新示例第三步"><a href="#完成合并-更新示例第三步" class="header-anchor">#</a> 完成合并（更新示例第三步）</h2> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token comment"># 处理完冲突后，提交代码</span>
<span class="token function">git</span> <span class="token function">add</span> <span class="token builtin class-name">.</span>
<span class="token function">git</span> commit <span class="token parameter variable">-m</span> 处理冲突

<span class="token comment"># 恢复工作现场</span>
<span class="token function">git</span> stash pop

<span class="token comment"># 更新后端依赖</span>
<span class="token function">composer</span> update

<span class="token comment"># 更新前端依赖</span>
<span class="token function">pnpm</span> <span class="token function">install</span>
</code></pre></div><h2 id="调整不兼容更新"><a href="#调整不兼容更新" class="header-anchor">#</a> 调整不兼容更新</h2> <p>框架可能会带来一些不兼容更新，比如：</p> <ul><li>本次更新框架同时更新了<code>Element-plus</code>，新版本的<code>Element-plus</code>废弃了<code>el-dialog</code>的<code>custom-class</code>属性，打开站点，F12控制台可见警告；打开编辑器在项目内搜索<code>custom-class</code>，将所有<code>el-dialog</code>的<code>custom-class</code>替换为<code>class</code>即可。</li> <li>v1.0.6版本框架更新了<code>buildValidatorData</code>的传参方式等等，需参考<a href="/guide/other/incompatibleUpdate/v106.html">v1.0.6不兼容更新</a>对已有代码进行修改。</li></ul></div> <footer class="page-edit"><div class="edit-link"><a href="https://gitee.com/wonderful-code/build-admin-doc/edit/master/docs/guide/other/update.md" target="_blank" rel="noopener noreferrer">点此帮助我们改善此页面</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2023/1/4 16:14:58</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/guide/other/gitCommitSpecification.html" class="prev">
        git 提交规范
      </a></span> <span class="next"><a href="/guide/other/appendix/getPoints.html">
        获取积分
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/assets/js/app.26dfc26f.js" defer></script><script src="/assets/js/2.845fc4bd.js" defer></script><script src="/assets/js/41.20484420.js" defer></script>
  </body>
</html>
